using System;

namespace Gma.UserActivityMonitor
{
    /// <summary>
    /// This class monitors all mouse activities globally (also outside of the application) 
    /// and provides appropriate events.
    /// </summary>
    public static partial class HookManager
    {
        private static event EventHandler<ExtendedMouseEventArgs> MouseMoveEvent;

        /// <summary>
        /// Occurs when the mouse pointer is moved. 
        /// </summary>
        public static event EventHandler<ExtendedMouseEventArgs> MouseMove
        {
            add
            {
                EnsureSubscribedToGlobalMouseEvents();
                MouseMoveEvent += value;
            }

            remove
            {
                MouseMoveEvent -= value;
                TryUnsubscribeFromGlobalMouseEvents();
            }
        }
    }
}